import request from '@/utils/request'

// 查询纳新报名列表
export function listApply(query) {
  return request({
    url: '/hd/apply/list',
    method: 'get',
    params: query
  })
}

// 查询纳新报名详细
export function getApply(id) {
  return request({
    url: '/hd/apply/' + id,
    method: 'get'
  })
}

// 新增纳新报名
export function addApply(data) {
  return request({
    url: '/hd/apply',
    method: 'post',
    data: data
  })
}

// 修改纳新报名
export function updateApply(data) {
  return request({
    url: '/hd/apply',
    method: 'put',
    data: data
  })
}

// 删除纳新报名
export function delApply(id) {
  return request({
    url: '/hd/apply/' + id,
    method: 'delete'
  })
}


// 修改审核状态
export function updateStatus(id,checks) {
  return request({
    url: '/hd/apply/updateStatus/'+ id +"/"+ checks,
    method: 'put'
  })
}

/** 学期列表 */
export function GetYearList(query) {
  return request({
    url: '/committee/year/list',
    method: 'get',
    params: query
  })
}

// 发送提醒
export function sendMsg(type,id,value,position) {
  return request({
    url: '/hd/apply/sendMsg/'+ type + "/" + id + "/" + value + "/" + position,
    method: 'put',
  })
}
